﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BlazorAppAuth.Migrations
{
    /// <inheritdoc />
    public partial class sqlite_migration_002 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "t_order",
                columns: table => new
                {
                    Id = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    OrderId = table.Column<int>(type: "INTEGER", nullable: false),
                    OrderType = table.Column<string>(type: "TEXT", nullable: false),
                    UserType = table.Column<string>(type: "TEXT", nullable: false),
                    UserName = table.Column<string>(type: "TEXT", nullable: false),
                    StartTime = table.Column<DateTime>(type: "TEXT", nullable: false),
                    OrderTime = table.Column<DateTime>(type: "TEXT", nullable: false),
                    Quantity = table.Column<int>(type: "INTEGER", nullable: false),
                    Priority = table.Column<int>(type: "INTEGER", nullable: false),
                    AssemblyTime = table.Column<DateTime>(type: "TEXT", nullable: false),
                    DrillingTime = table.Column<DateTime>(type: "TEXT", nullable: false),
                    AssemblyCount = table.Column<int>(type: "INTEGER", nullable: false),
                    DrillingCount = table.Column<int>(type: "INTEGER", nullable: false),
                    OrderStatus = table.Column<string>(type: "TEXT", nullable: false),
                    ElectricityConsumption = table.Column<double>(type: "REAL", nullable: false),
                    GasConsumption = table.Column<double>(type: "REAL", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_t_order", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "t_order");
        }
    }
}
